.TH RLM_DBM_PARSER 8
.SH NAME
rlm_dbm_parser - transforms simple syntax into rlm_dbm format
.SH SYNOPSIS
.B rlm_dbm_parser
.RB [ \-c ]
.RB [ \-d
.IR raddb ]
.RB [ \-i
.IR inputfile ]
.RB [ \-o
.IR outputfile ]
.RB [ \-x ]
.RB [ \-v ]
.RB [ \-q ]
[\fIusername ...\fP]

.SH DESCRIPTION
\fBrlm_dbm_parser\fP reads a file of the syntax defined below, and writes
a database file usable by rlm_dbm or edits current database.
.PP

.SH INPUT FORMAT

\fIrlm_dbm_parser\fP reads a format similar to the one used by the files
module. In incomplete RFC2234 ABNF, it looks like this:

.nf
entries     = *entry
entry       = identifier TAB definition
identifier  = username / group-name
username    = +PCHAR
groupname   = +PCHAR
definition  = (check-item ",")* LF ( *( reply-item ",") / ";" ) LF
check-item  = AS IN FILES
reply-item  = AS IN FILES
* need definition of username and groupname
.fi

As an example, these are the standard files definitions (files module).

.nf
DEFAULT   Service-Type == Framed-User
          Framed-IP-Address = 255.255.255.254,
          Framed-MTU = 576,
          Service-Type = Framed-User,
          Fall-Through = Yes

#except who call from number 555-666
DEFAULT   Auth-Type := Reject,Service-Type ==Framed-User,
          Calling-Station-ID == "555-666"

#or call number 555-667
DEFAULT   Auth-Type := Reject,Service-Type ==Framed-User,
          Calling-Station-ID == "555-667"
.fi

To be a valid rlm_dbm input file, it should look like this:

.nf
DEFAULT   Service-Type == Framed-User                     # (1)
          Framed-IP-Address = 255.255.255.254,            # comma, list cont'd
          Framed-MTU = 576,
          Service-Type = Framed-User,
          Fall-Through =  Yes                             # \\n, end of list
          Auth-Type := Reject,Service-Type ==Framed-User, # (2)
          Calling-Station-ID == "555-666"
          ;                                               # ;, no reply items
          Auth-Type := Reject,Service-Type ==Framed-User, # (3)
          Calling-Station-ID == "555-667"
          ;                                               # ditto
.fi

This user (the DEFAULT user) contains three entries, 1, 2 and 3. The
first entry has a list of reply items, terminated by a reply item
without a trailing comma. Entries 2 and 3 has empty reply lists, as
indicated by the semicolon. This is necessary to separate an empty
line (which is ignored) from the empty list.
Definition Fall-Through = Yes used in order to say module to check next
record. By default Fall-Through = Yes.

.SH OPTIONS

.IP \-d\ \fIraddb\fP
Use \fIraddb\fP as the radiusd configuration directory.
.IP \-i\ \fIinputfile\fP
Use \fIfile\fP as the input file. If not defined then use standard input.
.IP \-o\ \fIoutputfile\fP
Use \fIfile\fP as the output file.
.IP \-c
Create a new database (empty output file before writing)
.IP \-x
Enable debug mode. Multiple x flags increase debug level.
.IP \-q
Do not print statistics (quiet).
.IP \-v
Print the version and exit.
.IP \-r
Remove a username or group name from the database.

.SH SEE ALSO
radiusd(8)
.SH AUTHORS
.TP
Author:
Andrei Koulik <rlm_dbm@agk.nnov.ru>
.TP
Documentation:
Bjørn Nordbø  <bn@nextra.com>
